<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 联想
  Date: 2020/2/28
  Time: 13:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/layui/css/layui.css" media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->

</head>
<body>
<blockquote class="layui-elem-quote layui-text">
    信息展示
    <span style="color: red">${errorApplyMsg}</span>
    <span style="color: green">${rightApplyMsg}</span>
</blockquote>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>申请学分</legend>
</fieldset>
<form name="applyForm" id="applyForm" class="layui-form" enctype="multipart/form-data" method="post">
    <input type="hidden" name="activityNo" value="${applyScore.activityNo}">
    <input type="hidden" name="studentNo" value="${applyScore.studentNo}">
    <input type="hidden" name="teacherNo" value="${applyScore.teacherNo}">

    <div class="layui-form-item">
        <label class="layui-form-label">活动编号</label>
        <div class="layui-input-block">
            <input type="text" value="${applyScore.activityNo}" readonly="true" lay-verify="required"
                   lay-reqtext="用户名是必填项，岂能为空？" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea id="activityDescribe" name="applyNote" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>


    <blockquote class="layui-elem-quote layui-text">
        附件
    </blockquote>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>添加附件</legend>
    </fieldset>
    <div class="layui-upload">
        <input type="hidden" name="fileType" value="123">
        <input type="file" name="file"/>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1" onclick="formSubmit()">立即提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>

</form>
<script language="javascript">
    function formSubmit() {
        var action = "${pageContext.request.contextPath}/student/uploadApplyAnnex";
        action += "?fileType=" + document.applyForm.fileType.value;
        action += "?activityNo=" + document.applyForm.activityNo.value;
        action += "?studentNo=" + document.applyForm.studentNo.value;
        action += "?teacherNo=" + document.applyForm.teacherNo.value;
        action += "?applyNote=" + document.applyForm.applyNote.value;
        document.applyForm.action = action;
        document.applyForm.submit();
    }
</script>


</body>
</html>
